/**
 * Created by wuli等等 on 2017/3/1.
 */
import React, { Component, PropTypes } from 'react';
import { View, Text,StyleSheet ,TouchableNativeFeedback } from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';


export default class Back extends Component {
    _pressBack = () =>{
        const { navigator } = this.props;
        if(navigator) {
            //很熟悉吧，入栈出栈~ 把当前的页面pop掉，这里就返回到了上一个页面:FirstPageComponent了
            navigator.pop();
        }
    }

    render() {
        return (
                <TouchableNativeFeedback  onPress={this._pressBack} >
                    <View style={styles.back}>
                        <Icon name="chevron-left" size={20} color="#ffffff" style={styles.back}/>
                    </View>
                </TouchableNativeFeedback>

        )
    }
}
const styles=StyleSheet.create({
    back:{
        justifyContent: 'center',
        marginLeft:5
    },

});